<template>
    <div class="place-box">
      <div class="place-ma" :class="[IsShowImg ? '' : 'text']">
        <img v-if="IsShowImg" src="../../images/placeholder.jpg">
        <p>暂无数据</p>
      </div>
    </div>
</template>

<script>
export default {
  name: 'placeholder-img',
  props: {
    IsShowImg: { // 接口 是否显示图片
      type: Boolean,
      default: true
    }
  }
}
</script>

<style lang="scss" scoped>

.place-box{
  height: 100%;
  width: 100%;
  text-align: center;
  position: relative;
  .place-ma{
    width: 160px;
    height: 140px;
    position: absolute;
    top:50%;
    left: 50%;
    margin-left: -80px;
    margin-top: -70px;
    p{
      color: #909399;
    }
    &.text{
      line-height: 140px;
    }
  }
}
</style>
